/**
 * params:
 * [img_src, script, text, next_script, selected]
 */
function buildMenu1(divId, params) {
    var baseImgLocation = "style/powerhua/platform/menu/images/";
    var separatorSrc = "style/powerhua/platform/menu/images/separator.png";
    var nextImgSrc = "style/powerhua/platform/menu/images/next.png";
    var menuHtml = "";
    for(var i = 0; i < params.length; i++) {
        var param = params[i];
        var leftCss = "menu1_left";
        if(param[0] == "1") {
            leftCss = "menu1_left_selected";
        }
        menuHtml += "<div class='menu1'>";
        menuHtml += "<div class='" + leftCss + "'><img src='" + baseImgLocation + param[1] + "'>&nbsp; ";
        menuHtml += "<a href='#' onclick='" + param[2] + "();'>" + param[3] + "</a></div>";
        menuHtml += "<div class='menu1_right'>";
        if(param[4] != "") {
            menuHtml += "<img class='separator' src='" + separatorSrc + "'>";
            menuHtml += "<img onclick='" + param[4] + "();' src='" + nextImgSrc + "'>";
        }
        menuHtml += "</div>";
        menuHtml += "<div class='menu1_clear'></div>";
        menuHtml += "</div>";
    }
    $("#" + divId).html(menuHtml);
}